<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改售后厂家账号管理')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-afterFactoryLogin-edit" th:object="${zsyhAfterFactoryLogin}">
            <input name="id" th:field="*{id}" type="hidden">
            <!--<div class="form-group">
                <label class="col-sm-3 control-label">厂家id：</label>
                <div class="col-sm-8">
                    <input name="factoryId" th:field="*{factoryId}" class="form-control" type="text">
                </div>
            </div>-->
            <div class="form-group">    
                <label class="col-sm-3 control-label">姓名：</label>
                <div class="col-sm-8">
                    <input name="loginName" th:field="*{loginName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">手机号：</label>
                <div class="col-sm-8">
                    <input name="loginPhone" th:field="*{loginPhone}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">登陆账号：</label>
                <div class="col-sm-8">
                    <input name="loginAccount" th:field="*{loginAccount}" class="form-control" type="text">
                </div>
            </div>
            <!--<div class="form-group">
                <label class="col-sm-3 control-label">密码：</label>
                <div class="col-sm-8">
                    <input name="loginPassword" th:field="*{loginPassword}" class="form-control" type="text">
                </div>
            </div>-->
            <div class="form-group">    
                <label class="col-sm-3 control-label">是否有效：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('zsyh_yesno')}">
                        <input type="radio" th:id="${'loginValid_' + dict.dictCode}" name="loginValid" th:value="${dict.dictValue}" th:field="*{loginValid}">
                        <label th:for="${'loginValid_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">账号分类：</label>
                <div class="col-sm-8">
                    <select name="loginType" class="form-control m-b" th:with="type=${@dict.getType('factory_login')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{loginType}"></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "zsyh/afterFactoryLogin";
        $("#form-afterFactoryLogin-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-afterFactoryLogin-edit').serialize());
            }
        }
    </script>
</body>
</html>